﻿using System;
using CRM.Extensions;

namespace CRM.ViewModels.Customer
{
    public class GetIdByEmailVM : IEquatable<GetIdByEmailVM>
    {
        public int? Id { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
        public bool Equals(GetIdByEmailVM other)
        {
            return other != null && Email == other.Email;
        }

        public override int GetHashCode()
        {
            return (int)Email.GetFixedHashCode();
        }
    }
    
}
